package com.testing.class2;

import com.testing.web.WebKeywords;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;

/**
 * @Classname KeyTest
 * @Description 类型说明
 * @Date 2023/10/12 21:04
 * @Created by 特斯汀Roy
 */
public class KeyTest {
    public static void main(String[] args) {
        WebKeywords web=new WebKeywords();
        web.open("chrome");
        web.visitWeb("https://www.baidu.com");
        web.setSize();
        web.input("#kw","晓");
        web.click("#su");
//        web.halt("1");
        //显式等待
        web.waitTitleContains("晓");
        web.assertTitleIs("晓_百度搜索");
        web.assertElementTextContains(".result-op.c-container.new-pmd:nth-of-type(1) h3 span:nth-child(1) span:nth-child(1)","百度汉语");
        web.quit();
    }
}
